<import resource="classpath:alfresco/site-webscripts/org/alfresco/components/workflow/workflow.lib.js">

function main()
{
    // Widget instantiation metadata...
    var startDocument = {
        id : "StartDocument",
        name : "RC.StartDocument",
        options : {
            failureMessage : "Nepavyko pradėti kurti dokumentą",
            submitButtonMessageKey : "Pradėti kurti dokumentą",
            defaultUrl : getSiteUrl("my-tasks"),
            workflowToStart : (page.url.args.workflowToStart != null) ? page.url.args.workflowToStart: "",
            documentType : (page.url.args.documentType != null) ? page.url.args.documentType : "",
            workflowDefinitions : model.workflowDefinitions
        }
    };

    var dashletResizer = {
        id : "DashletResizer",
        name : "Alfresco.widget.DashletResizer",
        initArgs : ["\"" + args.htmlid + "\"", "\"" + instance.object.id + "\""],
        useMessages: false
    };

    var dashletTitleBarActions = {
        id : "DashletTitleBarActions",
        name : "Alfresco.widget.DashletTitleBarActions",
        useMessages : false,
        options : {
            actions: [
            {
                cssClass: "help",
                bubbleOnClick:
            {
            message: msg.get("dashlet.help")
            },
            tooltip:  msg.get("dashlet.help.tooltip")
            }]
        }
    };

model.widgets = [startDocument, dashletResizer, dashletTitleBarActions];
}

main();
